home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Other Stuff
/
Other Stuff ’97
/
PowerOS Development
/
booter
/
stdhdr.s
< prev
Wrap
Text File
|
1997-06-26
|
2KB
|
128 lines
/*
stdhdr.s
a header file for PowerOS
copyright 1996-1997 by Ben Martz
all rights reserved world wide
ANY AND ALL MODIFICATIONS TO THIS SOURCE MUST CREDIT THE ORIGINAL
AUTHOR, BEN MARTZ (benmartz@ic.net), AND MUST BE GIVEN TO THE AUTHOR
FOR INTEGRATION INTO THE MAIN PowerOS SOURCE TREE. THANK YOU FOR YOUR
COOPERATION!
*/
#ifndef __MWERKS__
#define r0 0
#define r1 1
#define r2 2
#define r3 3
#define r4 4
#define r5 5
#define r6 6
#define r7 7
#define r8 8
#define r9 9
#define r10 10
#define r11 11
#define r12 12
#define r13 13
#define r14 14
#define r15 15
#define r16 16
#define r17 17
#define r18 18
#define r19 19
#define r20 20
#define r21 21
#define r22 22
#define r23 23
#define r24 24
#define r25 25
#define r26 26
#define r27 27
#define r28 28
#define r29 29
#define r30 30
#define r31 31
#define SP r1
#define RTOC r2
#define f0 0
#define f1 1
#define f2 2
#define f3 3
#define f4 4
#define f5 5
#define f6 6
#define f7 7
#define f8 8
#define f9 9
#define f10 10
#define f11 11
#define f12 12
#define f13 13
#define f14 14
#define f15 15
#define f16 16
#define f17 17
#define f18 18
#define f19 19
#define f20 20
#define f21 21
#define f22 22
#define f23 23
#define f24 24
#define f25 25
#define f26 26
#define f27 27
#define f28 28
#define f29 29
#define f30 30
#define f31 31
/* SPRs */
#define XER 1
#define LR 8
#define CTR 9
#define DEC 22
#define SRR0 26
#define SRR1 27
#define SPRG0 272
#define SPRG1 273
#define SPRG2 274
#define SPRG3 275
#define DBAT0U 536
#define DBAT0L 537
#define DBAT1U 538
#define DBAT1L 539
#define DBAT2U 540
#define DBAT2L 541
#define DBAT3U 542
#define DBAT3L 543
/* read-only SPRs on 601 */
#define RTBU 4
#define RTBL 5
#define PVR 287
/* write-only SPRs on 601 */
#define WTBU 285
#define WTBL 286
#endif
/* msr encodings */
#define MSR_EE (1 << 15)
#define MSR_PR (1 << 14)
#define MSR_FP (1 << 13)
#define MSR_ME (1 << 12)
#define MSR_FE0 (1 << 11)
#define MSR_SE (1 << 10)
#define MSR_FE1 (1 << 8)
#define MSR_IP (1 << 6)
#define MSR_IR (1 << 5)
#define MSR_DR (1 << 4)
#define MSR_KERNEL MSR_ME | MSR_IR | MSR_DR
#define MSR_KERNEL_EE MSR_KERNEL | MSR_EE
#define MSR_USER MSR_KERNEL_EE | MSR_PR